<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnExport").click(function(){
				top.$.jBox.confirm("确认要导出物业信息数据吗？","系统提示",function(v,h,f){
					if(v=="ok"){
						$("#searchForm").attr("action","${ctx}/sys/manageTenenment/exportTenement");
						$("#searchForm").submit();
					}
				},{buttonsFocus:1});
				top.$('.jbox-body .jbox-icon').css('top','55px');
			});
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！"});
			});
		});
		function page(n,s){
			if(n) $("#pageNo").val(n);
			if(s) $("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/sys/manageTenenment/manageTenementList");
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
</head>
<body>
	<div id="importBox" class="hide">
		<form id="importForm" action="${ctx}/sys/manageTenenment/importTenement" method="post" enctype="multipart/form-data"
			class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入，请稍等...');"><br/>
			<input id="uploadFile" name="file" type="file" style="width:330px"/><br/><br/>　　
			<input id="btnImportSubmit" class="btn btn-primary" type="submit" value="   导    入   "/>
			<a href="${ctx}/sys/manageTenenment/import/templateTenement">下载模板</a>
		</form>
	</div>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/manageTenenment/manageTenementList">物业费列表</a></li>
		<li><a href="${ctx}/sys/manageTenenment/form">物业费添加</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="tbUserTenementInfo" action="${ctx}/sys/manageTenenment/manageTenementList" method="post" class="breadcrumb form-search ">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li>
				<label>小区名称：</label><form:input path="cellname" htmlEscape="false" maxlength="50" class="input-medium"/>
				<label>门牌号：</label><form:input path="showName" htmlEscape="false" maxlength="50" class="input-medium"/>
				<label>业主姓名：</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>

				<label>联系方式：</label><form:input path="mobile" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li><li>	<label>日期范围：&nbsp;</label>
			<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20"
				   class="input-mini Wdate" value="<fmt:formatDate value="${tbUserTenementInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			--&nbsp;<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
						   value="<fmt:formatDate value="${tbUserTenementInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>&nbsp;&nbsp;
		</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
				<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
				<input id="btnImport" class="btn btn-primary" type="button" value="导入"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<span><font style="color: #00A6C7">${message1}</font></span>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr><th class="sort-column login_name">小区名</th>
			<th class="sort-column name">业主名称</th><th>联系电话</th>
			<th>门牌</th><th>住户面积</th><th>物业单价</th><th>缴费金额</th>
			<th>返消费缴费系数</th><th>返还消费金额</th><%--<th>角色</th> --%>
			<th>操作</th></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="userTenementInfo">
			<tr>
				<%--<td><a href="${ctx}/sys/user/form?id=${user.id}">${user.loginName}</a></td>--%>
				<input id="id" name="id" type="hidden" value="${userTenementInfo.id}"/>
				<td>${userTenementInfo.cellname}</td>
				<td>${userTenementInfo.name}</td>
				<td>${userTenementInfo.mobile}</td>
				<td>${userTenementInfo.showName}</td>
				<td>${userTenementInfo.coveredArea}</td>
				<td>${userTenementInfo.propertyFee}</td>
				<td>${userTenementInfo.totalFee}</td>
				<td>${userTenementInfo.buildingNo}</td>
				<td>${userTenementInfo.backFee}</td>
					<%--<td>${user.roleNames}</td> --%>
				<td>
    				<%--<a href="${ctx}/sys/user/form?id=${userTenementInfo.id}">修改</a>--%>
					<a href="${ctx}/sys/manageTenenment/delete?id=${userTenementInfo.id}" onclick="return confirmx('确认要删除该物业信息吗？', this.href)">删除</a>
						<a href="${ctx}/sys/manageTenenment/form?id=${userTenementInfo.id}" >修改</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>